﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace FoobarFootball.Models
{
    public partial class Team
    {
        public int Id { get; set; }
        public string Name { get; set; }
        public int Cash { get; set; }
        public int Level { get; set; }
        public string Nation { get; set; }
        public Stadium Stadium { get; set; }
        public List<Player> Squad { get; set; }
        public Squad FirstTeam { get; set; }
        public Squad Reserves { get; set; }
        public Squad Youths { get; set; }
        public Squad MatchSquad { get; set; }
        public int Score;
        public Player PlayerInPossession { get; set; }
        public Player SupportingPlayer { get; set; }
        public Player ChallengingPlayer { get; set; }
        public Formation MatchFormation { get; set; }

        public Player BestSupportingPlayer(Position p)
        {
            return new Player();
        }

        public Player BestChallengingPlayer(Position p)
        {
            return new Player();
        }

        /// <summary>
        /// Move players in the team to their kick off positions.
        /// </summary>
        public void MovePlayersToKickoffPosition(Pitch pitch)
        {
            //TODO: base this off of the teams current formation

            // Assume the the current formation is 4 4 2
            MatchSquad.NumberOne.CurrentPosition = pitch.Three;
        }
    }
}
